home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 44
/
Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso
/
Aminet
/
dev
/
gui
/
gtlayout.lha
/
Source
/
LT_UpdateStrings.c
< prev
next >
Wrap
C/C++ Source or Header
|
1999-01-02
|
2KB
|
93 lines
/*
** GadTools layout toolkit
**
** Copyright © 1993-1999 by Olaf `Olsen' Barthel
** Freely distributable.
**
** :ts=4
*/
#ifndef _GTLAYOUT_GLOBAL_H
#include "gtlayout_global.h"
#endif
#include "Assert.h"
STATIC VOID
LTP_UpdateStrings(ObjectNode *Group)
{
ObjectNode *Node;
ULONG Page;
SCANPAGE(Group,Node,Page)
{
switch(Node->Type)
{
case FRACTION_KIND:
case PASSWORD_KIND:
case STRING_KIND:
case INTEGER_KIND:
if(Node->Host)
LTP_PutStorage(Node);
break;
#ifdef DO_TEXTEDIT_KIND
{
case TEXTEDIT_KIND:
if(Node->Host != NULL)
LTP_PutStorage(Node);
break;
}
#endif /* DO_TEXTEDIT_KIND */
case GROUP_KIND:
LTP_UpdateStrings(Node);
break;
}
}
}
/****** gtlayout.library/LT_UpdateStrings ******************************************
*
* NAME
* LT_UpdateStrings -- Make sure all visible string buffer contents
* get written into storage (v9).
*
* SYNOPSIS
* LT_UpdateStrings(LayoutHandle);
* A0
*
* VOID LT_UpdateStrings(struct LayoutHandle *);
*
* FUNCTION
* The user can terminate input into a string gadget or an object
* derived from a string gadget by various means. They all have
* in common that the application receives no notification that
* the string gadget contents have changed. This is particularly
* nasty with objects which make use of LA_STRPTR or other
* tags. Using LT_UpdateStrings() you can force all visible string
* gadget objects to hand over their contents to the internal
* buffers. Do this before you eventually exit your input loop.
*
* INPUTS
* LayoutHandle - Pointer to LayoutHandle structure.
*
* RESULT
* none
*
******************************************************************************
*
*/
VOID LIBENT
LT_UpdateStrings(REG(a0) LayoutHandle *Handle)
{
if(Handle)
LTP_UpdateStrings(Handle->TopGroup);
}